<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
<link rel="stylesheet" type="text/css" href="template/default/content/css/style.css">
<script language="javascript" type="text/javascript" src="DatePicker/WdatePicker.js"></script>
<script language="javascript" type="text/javascript" src="template/default/js/jquery.min.js"></script>
<script src="template/default/tree/js/admincp.js?SES" type="text/javascript"></script>
<script charset="utf-8" src="eweb/kindeditor.js"></script>
<script type="text/javascript"> 
function show_help()
{
   mytop=(screen.availHeight-430)/2;
   myleft=(screen.availWidth-800)/2;
   window.open("admin.php?ac=view&fileurl=help&helpid=<?=$fileurl?>","","height=470,width=800,status=0,toolbar=no,menubar=no,location=no,scrollbars=yes,top="+mytop+",left="+myleft+",resizable=yes");
}
function show_view()
{
   mytop=(screen.availHeight-430)/2;
   myleft=(screen.availWidth-800)/2;
   window.open("admin.php?ac=views&fileurl=work&id=<?=$blog['id']?>","","height=470,width=800,status=0,toolbar=no,menubar=no,location=no,scrollbars=yes,top="+mytop+",left="+myleft+",resizable=yes");
}
filenumber_show()
function filenumber_show()
{
   jQuery.ajax({
      type: 'GET',
      url: 'admin.php?ac=file&fileurl=public&officeid=<?=$_GET['id']?>&officetype=3&'+new Date(),
      success: function(data){
		  if(data!=''){
			  $("#filenumber").html(data);
		  }else{
			  $("#filenumber").html('还没有附件!');
		  }
      }
   });
}
fileoffice_show()
function fileoffice_show()
{
   jQuery.ajax({
      type: 'GET',
      url: 'admin.php?ac=file&do=office&fileurl=public&officeid=<?=$_GET['id']?>&officetype=3&'+new Date(),
      success: function(data){
		  if(data!=''){
			  $("#filenumberoffice").html(data);
		  }else{
			  $("#filenumberoffice").html('还没有文档!');
		  }
      }
   });
}
</script>
<title>Office 515158 2011 OA办公系统</title>
 
</head>
<body>
<table width="90%" border="0" align="center" cellpadding="3" cellspacing="0" class="small">
  <tr>
    <td class="Big"><img src="template/default/content/images/notify_new.gif" align="absmiddle"><span class="big3"> 流程设置</span>&nbsp;&nbsp;&nbsp;&nbsp;
	<span style="font-size:12px;"><a href="#" onClick="show_help()" style="font-size:12px;">使用帮助文档？</a>&nbsp;|&nbsp;
	<a href="http://bbs.515158.com/" target="_blank" style="font-size:12px;">使用遇到问题？</a>&nbsp;|&nbsp;
	<a href="admin.php?ac=office&fileurl=<?=$fileurl?>" style="font-size:12px;">返回列表页</a><img src="template/default/content/images/f_ico.png" align="absmiddle">&nbsp;|&nbsp;
	<a href="#" onClick="show_view()" style="font-size:12px;color:red;">查看工作流程信息</a>
	&nbsp;|&nbsp;<a href="#" onClick="window.open ('admin.php?ac=views&do=flow&fileurl=work&id=<?=$blog['id']?>', 'newwindow', 'height=500, width=500, top=50, left=100, toolbar=no, menubar=no, scrollbars=yes, resizable=no,location=no, status=no')">查看审批记录</a>
	</span>
    </td>
  </tr>
</table>
<script Language="JavaScript"> 
function CheckForm()
{
   if(document.save.userkey.value=="")
   { alert("审批人员不能为空！");
     document.save.userkey.focus();
     return (false);
   }
   if(document.save.lnstructions.value=="")
   { alert("批示不能为空！");
     document.save.lnstructions.focus();
     return (false);
   }
   
   return true;
}
function sendForm()
{
   if(CheckForm())
      document.save.submit();
}
</script>
<form name="save" method="post" action="?ac=views_office&do=save&fileurl=work">
<input type="hidden" name="workclassid" value="<?=$blog["id"]?>" />
<table class="TableBlock" border="0" width="90%" align="center">

 <tr>
   <td height="60" colspan="2" align="center" nowrap class="TableContent"><span class="big3"> <?=$blog['title']?></span></td>
   </tr>
   
 <tr>
      <td nowrap class="TableContent" width="15%"> 
        设置审批人员：<? get_user_add_help()?></td>
      <td class="TableData">
<?php
	 get_oa_member_public(1,"userkey",GET_INC_USER_NAME($_USER->id),"+选择审批人员",120,20);
	 ?>
	 <br>
	 <?php get_sms_info_phone_box("审批人员","shownamemaster")?>
	 <br>
	 设置下一步流程审批人员	 </td>
    </tr>
	
 <tr>
      <td nowrap class="TableContent" width="15%">批示：</td>
      <td class="TableData">
	  
	    <textarea name="lnstructions" rows="8" class="BigInput" id="lnstructions" style="width: 500px;"></textarea>	  </td>
    </tr>
 
 
<?php
$flow = $db->fetch_one_array("SELECT number,id,type FROM ".DB_TABLEPRE."workclass_flow WHERE template_id='".$blog["worktemplate"]."' and type_id='".$blog["workclasstype"]."' and unionid='".union_id."' ORDER BY id desc LIMIT 1");
if($flow["id"]!=''){
?>

<tr>
      <td nowrap class="TableContent" width="15%">流程节点：</td>
      <td class="TableData">
	    <select name="flowid">
<?
global $db;
$query = $db->query("SELECT * FROM ".DB_TABLEPRE."workclass_flow where template_id='".$blog["worktemplate"]."' and unionid='".union_id."' ORDER BY id Asc");
	while ($row = $db->fetch_array($query)) {
?>
	      <option value="<?=$row["number"]?>" selected="selected">第<?=$row["number"]?>步：<?=$row["title"]?></option>
<?php }?>
	      </select></td>
    </tr>
<?php }?>
 <tr>
      <td nowrap class="TableContent" width="15%">状态：</td>
      <td class="TableData"><input name="type" type="radio" value="1" checked="checked" />
        继续下一步流程
	  <input type="radio" name="type" value="2" />流程结束</td>
    </tr>
 <?php if($_CONFIG->config_data('configoffice')=='1'){?>
  
	 <tr>
      <td nowrap class="TableHeader" colspan="2"><b>&nbsp;正文设置</b></td>
    </tr>  
	<tr>
      <td nowrap class="TableContent" width="15%">文档：</td>
      <td class="TableData" id="filenumberoffice">
	 </td>
    </tr>
	<input type="hidden" name="fileofficeid" class="BigInput"  onpropertychange="fileoffice_show();" />
	 <? }?>
 
 
 
 <tr align="center" class="TableControl">
      <td colspan="2" nowrap height="35">
<!-- onclick="sendForm();" -->
		<input type="button" name="Submit" value="提交设置流程办理" class="BigButton" onclick="sendForm();">      </td>
    </tr>
  </table>
</form>


 
</body>
</html>
